#ifndef RESOURCELISTWIDGET_H
#define RESOURCELISTWIDGET_H

#include <QObject>
#include <QListWidget>
#include <QFileInfo>

class ResourceListWidget:public QListWidget
{
    Q_OBJECT
public:
    ResourceListWidget(QWidget* parent = nullptr);
    ~ResourceListWidget();

    virtual void dragEnterEvent(QDragEnterEvent *event);
    inline void SetResPath(QString path);
    inline void SetCurPath(QString path);
    inline QString GetResPath();
    inline QString GetCurPath();
    QString GetCurItemPath();
private:
    void Init();
    QString resPath = "../MyGame/res_icon/";
    QString curPath = "../MyGame/res_icon/";
    void RefreshList(QString path);
    void AddFileItem(QFileInfo &fi);
    void AddIconItem(QString iconPath,QString name);
    QSize iconSize = QSize(100,100);
signals:
public slots:
    void ClickItemSlot(QListWidgetItem *item);
};

#endif // RESOURCELISTWIDGET_H
